/**
 * 
 */
package com.dp.creat.prototype;

/**
 * This is to describe prototype design pattern.
 * 
 * This pattern allows an object to create customised objects without knowing
 * their class or any details on how to create them. It is used in a scenario
 * when object creation is time consuming and costly so instead of going through
 * a time consuming process , just copy existing similar object and modify it.
 * 
 * @author Sunaina.Sharma
 * 
 */
public class PrototypeEx {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Person person = new Person();
		System.out.println(person);
		Person newPerson = new Person();
		newPerson.modifyAge(16);
		System.out.println(newPerson);
	}
}
